//package com.imooc.bilibili.api;
//
//import com.imooc.bilibili.domain.JsonResponse;
//import com.imooc.bilibili.domain.video.Video;
//import com.imooc.bilibili.service.ElasticSearchService;
//import com.imooc.bilibili.service.feign.MsDeclareService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.Map;
//
//@RestController
//public class DemoApi {
//
//    @Autowired
//    private ElasticSearchService elasticSearchService;
//
//    @Autowired
//    private MsDeclareService msDeclareService;
//
//    @GetMapping("/es-videos")
//    public JsonResponse<Video> getEsVideos(@RequestParam String keyword) {
//        Video video = elasticSearchService.getVideos(keyword);
//        return new JsonResponse<>(video);
//    }
//
//    @GetMapping("/demos")
//    Long msget(@RequestParam Long id) {
//        return msDeclareService.msget(id);
//    }
//
//    @PostMapping("/demos")
//    Map<String, Object> mspost(@RequestBody Map<String, Object> params) {
//        return msDeclareService.mspost(params);
//    }
//}
